/*
 * @lc app=leetcode.cn id=1909 lang=javascript
 *
 * [1909] 删除一个元素使数组严格递增
 */

// @lc code=start
/**
 * @param {number[]} nums
 * @return {boolean}
 */
var canBeIncreasing = function (nums) {
  let pre = nums[0], num = 0;
  for (let i = 1; i < nums.length; i++) {
    if (nums[i] > pre) {
      pre = nums[i];
    } else {
      if (++num > 1) {
        return false;
      }
    }
  }
  return true;
};
// @lc code=end

